Skip to content

fix(windows): ship Windows release binaries and repair the PowerShell installer - #41

Merged
sagnik11 merged 2 commits into
mainfrom
posthog/windows-release-and-installer-fixes
Aug 16, 2026
Merged

fix(windows): ship Windows release binaries and repair the PowerShell installer#41
sagnik11 merged 2 commits into
mainfrom
posthog/windows-release-and-installer-fixes

Conversation

@sagnik11

@sagnik11 sagnik11 commented Aug 16, 2026

Copy link
Copy Markdown
Member

P0: Windows install broken end-to-end (5 reporters)

Three stacked root causes, all fixed here, plus two additional release-pipeline bugs found while fixing them.

1. Releases shipped no Windows binaries (the 404s)

release.yml had no Windows targets, so every autter-windows-x64.exe download 404'd while docs advertised Windows support.

  • Added autter-windows-x64.exe (x86_64-pc-windows-msvc) and autter-windows-arm64.exe (aarch64-pc-windows-msvc, cross-compiled via the VS 2022 ARM64 toolchain) on windows-2022 runners. No OpenSSL involved on Windows — TLS uses native-tls/SChannel; the only C build is bundled SQLite.
  • Both binaries are included in checksums.txt and the embedded checksum string.
  • A version-pinned install.ps1 is now attached to releases (same fill-install-template.py), giving Windows the same pin + checksum verification as install.sh.

2. install.ps1 arch detection crashed (PropertyNotFoundException)

  • Get-Architecture now prefers PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE (present on every PowerShell; the former catches 32-bit shells on 64-bit Windows, where the old fallback misdetected x86 and returned null), with RuntimeInformation as a guarded last resort — some Windows PowerShell 5.1 hosts cannot resolve that type at all.
  • The unsupported-architecture error message no longer re-probes RuntimeInformation outside a try/catch — that probe was itself throwing, replacing the friendly error with an uncaught PropertyNotFound/TypeNotFound exception.

3. Opaque "HTTP error" on download failure

Every failed attempt is now recorded as <url> -> HTTP <code> <status> (or the exception message for network/TLS failures). The final error lists exactly what was tried, and 404s get targeted guidance (release lacks Windows binaries; they ship with v1.6.8+; how to unpin AUTTER_RELEASE_TAG). Verified against the real v1.6.7 404:

Error: Failed to download autter-windows-x64 (release: v1.6.7). Attempted:
  https://github.com/Autter-dev/autter-cli/releases/download/v1.6.7/autter-windows-x64.exe
    -> HTTP 404 NotFound
A 404 means release 'v1.6.7' does not include a Windows binary named autter-windows-x64.
Windows binaries ship with releases v1.6.8 and later - see https://github.com/autter-dev/autter-cli/releases
...

Docs one-liner (iex getting stripped)

"irm … | iex" loses iex wherever quoting is stripped/mangled (smart quotes, quote-stripping shells) because the | becomes a real shell pipe. Docs now use "iex (irm …)" — no pipe to hijack; works from PowerShell, cmd, and Git Bash.

Bonus bug A: pinned install scripts self-destructed on fill (all platforms)

fill-install-template.py replaces every placeholder occurrence including the guard comparisons, so the pinned install.sh attached to releases compared "v1.6.7" != "v1.6.7" (pin silently ignored → installed latest) and compared the checksum string to itself (verification silently skipped). Confirmed against the actual v1.6.7 release asset. Both scripts now compare against concatenation-built sentinels that survive the fill.

Bonus bug B: main did not compile

A refactor left a stale events reference in enqueue_transcript_file (src/authorship/cas_bridge.rs); with no PR CI on this repo it landed unnoticed. Any tagged release would have failed to build. Removed the leftover block.

Validation

  • workflow_dispatch release build (build-only, publishes nothing) on this branch: all 6 targets — see Actions.
  • install.ps1 template and its release-filled variant parse clean; the real Get-Architecture/Try-Download/Verify-Checksum functions were extracted via AST and exercised under Set-StrictMode -Version Latest on PowerShell 7: 17/17 scenarios pass (WOW64 detection, real 404 capture, DNS failure, checksum match/mismatch/sentinel-skip).
  • bash -n on install.sh template + filled copy; fill simulation leaves no stray placeholder tokens.
  • task build passes with the compile fix.

After merge

Tag v1.6.8 (Cargo.toml is already at 1.6.8) to ship the first release with Windows binaries. The served api.autter.dev/install.ps1 tracks main, so the installer fixes reach users on merge.


Created with PostHog Desktop


View code changes stack in Autter

Summary

Summary generated by Autter.
This PR adds native Windows x64 and ARM64 binaries to the release workflow and repairs the PowerShell installer’s release-artifact, checksum, PATH, and process-handling logic. It also updates installation documentation and removes obsolete transcript-enqueue code so published Windows releases can be installed and upgraded reliably.

Changes

  • Extend .github/workflows/release.yml to:
    • Build autter-windows-x64.exe for x86_64-pc-windows-msvc.
    • Build autter-windows-arm64.exe for aarch64-pc-windows-msvc.
    • Upload both Windows binaries with the other platform release assets.
    • Preserve manual-build validation without publishing a release.
    • Keep release tags scoped to CLI version tags rather than VS Code extension tags.
  • Update install.ps1 to:
    • Resolve and verify Windows release binaries correctly.
    • Wait for locked binaries during upgrades and stop the background service or lingering managed processes when necessary.
    • Handle checksum verification and PATH updates consistently.
    • Select the Windows executable asset name expected by the release workflow.
  • Align install.sh, README.md, and INSTALL.md with the installer and release changes.
  • Remove the unused transcript-file enqueue helper from src/authorship/cas_bridge.rs.
  • Add release notes in changelog/windows-release-and-installer-fixes.md.

Acceptance Criteria

  • A CLI release tag produces Windows x64 and ARM64 executable assets named autter-windows-x64.exe and autter-windows-arm64.exe.
  • The PowerShell installer downloads the correct Windows asset, verifies its checksum when a pinned release includes checksums, installs it under ~/.autter/bin, and updates the user PATH without duplicating the entry.
  • Re-running the PowerShell installer succeeds when the existing Autter binary or background service is holding the file, either after graceful shutdown or managed-process cleanup.
  • The documented Windows installation command matches the supported PowerShell installer flow, including use from Command Prompt and Git Bash.
  • Manual workflow dispatch builds all release targets but does not publish a GitHub release.
  • The removed transcript helper is no longer referenced by the Rust codebase and the project still builds successfully.

Test Plan

  • Run task fmt and task lint locally and confirm both complete without errors.
  • Run task test and confirm the default daemon-mode test suite passes.
  • Trigger .github/workflows/release.yml with workflow_dispatch and verify both Windows artifacts are built and uploaded with the expected names, without a release being published.
  • On Windows x64, run the documented PowerShell installer command and verify autter --version and autter debug work in a newly opened terminal.
  • Re-run the installer on the same Windows machine while the Autter daemon is active and verify the existing installation is replaced successfully.
  • Test a pinned release installer with a valid checksum and confirm verification succeeds; modify the downloaded binary or use an invalid checksum and confirm installation fails rather than installing it.
  • On an ARM64 Windows environment, install the ARM64 release asset and verify the CLI starts successfully.

Rollback Plan

  • If the release workflow fails, revert the workflow changes and stop publishing the Windows assets; existing macOS and Linux release assets can continue using the previous workflow.
  • If the PowerShell installer causes upgrade or installation failures, restore the previous install.ps1 from the last known-good release and direct Windows users to that pinned installer while the fix is prepared.
  • If a published Windows release is defective, remove or mark the affected Windows assets in the GitHub Release and republish from the previous known-good tag.
  • If the source cleanup causes a Rust build or runtime regression, revert the cas_bridge.rs change independently; it is separate from the release and installer changes.

Related Issues

No linked issue was identified.

Written for commit 7a8efc2. Summary will update on new commits.

… installer

Windows installs were broken end-to-end:
- release.yml built no Windows targets, so every autter-windows-x64.exe
  download 404'd while the docs advertised Windows support. Add
  x86_64-pc-windows-msvc and aarch64-pc-windows-msvc builds and attach a
  version-pinned install.ps1 to releases.
- install.ps1 arch detection could crash: RuntimeInformation is
  unresolvable on some Windows PowerShell 5.1 hosts, the env-var fallback
  misdetected 32-bit shells on 64-bit Windows (WOW64 reports x86), and
  the unsupported-arch error re-probed RuntimeInformation outside any
  try/catch, dying with PropertyNotFound instead of a useful message.
  Detection now prefers PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE.
- Download failures collapsed to "Failed to download binary (HTTP
  error)". Each attempt now records its URL and HTTP status, and 404s
  explain that the release lacks Windows binaries and how to recover.
- The documented one-liner "irm ... | iex" loses iex wherever quoting is
  stripped (the pipe gets hijacked by the outer shell); docs now use
  "iex (irm ...)" which has no pipe to hijack.
- Latent bug on all platforms: fill-install-template.py rewrites every
  placeholder occurrence, including the guard comparisons, so pinned
  release scripts ignored their version pin and silently skipped
  checksum verification (confirmed against the v1.6.7 asset). Guards in
  both install scripts now compare against concatenation-built sentinels
  that survive the fill.

Generated-By: PostHog Desktop
Task-Id: e7b264f3-e943-4463-a70c-be3d056017ab
A refactor extracted raw-transcript parsing into
messages_from_transcript_file() but left the old normalize block behind
in enqueue_transcript_file, still referencing the now-nonexistent
`events` local. With no PR CI on this repo, the broken merge landed
unnoticed: main did not compile, so any tagged release build would have
failed before publishing.

Generated-By: PostHog Desktop
Task-Id: e7b264f3-e943-4463-a70c-be3d056017ab

@autter-dev autter-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Autter review in progress — running security, correctness & dependency checks on this PR. Follow live step-by-step progress on the autter/review-gate check in the merge box. Merge is blocked until the gate completes; Autter approves automatically when the review comes back clean, and releases this hold with a neutral review when it finds non-blocking issues.

@autter-dev

autter-dev Bot commented Aug 16, 2026

Copy link
Copy Markdown

🚦 Pre-merge checks · ⚠️ 5 warning, ✅ 178 passed

Needs attention

Check Status Explanation
Mixed concerns (refactor + behavior change) ⚠️ Warning The PR combines a no-behavior cleanup removing an obsolete Rust helper with substantial Windows installer and release-pipeline behavior changes. Split the obsolete helper removal into a separate cleanup PR, keeping the Windows installer, documentation, and release workflow fixes together. No high-fan-in or cross-scope ... [truncated 20 chars]
Missing linked tracker issue ⚠️ Warning 1 potential issue(s) detected (max risk 50/100): .github/workflows/release.yml:66.
Missing CODEOWNERS reviewer approval ⚠️ Warning 1 potential issue(s) detected (max risk 65/100): .github/workflows/release.yml:66.
Source changes without matching tests ⚠️ Warning 1 potential issue(s) detected (max risk 60/100): src/authorship/cas_bridge.rs:107.
Deployment workflow changed ⚠️ Warning 1 potential issue(s) detected (max risk 60/100): .github/workflows/release.yml:4.
✅ Passed checks (178)
Check Status Explanation
Too many files changed ✅ Passed Changed 7 file(s), within the limit of 50.
Too many lines changed ✅ Passed Changed 207 line(s), within the limit of 1000.
Too many unrelated chapters ✅ Passed 3 chapter(s) detected, within the limit of 6.
Generated files hiding real changes ✅ Passed Generated-file volume (0 lines) does not obscure the 207 hand-written line(s).
Missing PR context ✅ Passed PR context looks sufficient.
Migration + app logic + UI combined in one PR ✅ Passed The PR contains no database migrations and no combined migration, application-logic, and UI change.
Sensitive data in logs ✅ Passed No sensitive data in logs issues detected.
Log injection ✅ Passed No log injection issues detected.
Missing audit logging ✅ Passed No missing audit logging issues detected.
Removed observability ✅ Passed No removed observability issues detected.
Silent exception swallowing ✅ Passed No silent exception swallowing issues detected.
Unhandled promise rejection ✅ Passed No unhandled promise rejection issues detected.
Circuit breaker not detected ✅ Passed No circuit breaker not detected issues detected.
Stack trace leakage ✅ Passed No stack trace leakage issues detected.
Multi-write without detected transaction ✅ Passed No multi-write without detected transaction issues detected.
Possible TOCTOU in critical path ✅ Passed No possible toctou in critical path issues detected.
Idempotency key not detected ✅ Passed No idempotency key not detected issues detected.
Possible non-atomic read-modify-write ✅ Passed No possible non-atomic read-modify-write issues detected.
Optimistic locking not detected ✅ Passed No optimistic locking not detected issues detected.
Rate limiting not detected ✅ Passed No rate limiting not detected issues detected.
Rate limiting removed ✅ Passed No rate limiting removed issues detected.
Batch size limit not detected ✅ Passed No batch size limit not detected issues detected.
Pagination not detected ✅ Passed No pagination not detected issues detected.
Publicly exposed storage ✅ Passed No publicly exposed storage issues detected.
Over-permissive IAM policy ✅ Passed No over-permissive iam policy issues detected.
Security group open to the internet ✅ Passed No security group open to the internet issues detected.
Unencrypted storage at rest ✅ Passed No unencrypted storage at rest issues detected.
Infrastructure missing access logging ✅ Passed No infrastructure missing access logging issues detected.
Hardcoded secret in IaC ✅ Passed No hardcoded secret in iac issues detected.
Infrastructure misconfiguration ✅ Passed No infrastructure misconfiguration issues detected.
Deprecated Kubernetes API version ✅ Passed No deprecated kubernetes api version issues detected.
Compound IaC attack chain ✅ Passed No compound iac attack chain issues detected.
Prompt injection risk ✅ Passed No LLM/AI-integration code touched by this diff.
LLM output used in a dangerous sink ✅ Passed No LLM/AI-integration code touched by this diff.
Sensitive data in prompt or system-prompt leakage ✅ Passed No LLM/AI-integration code touched by this diff.
Over-privileged LLM tool / excessive agency ✅ Passed No LLM/AI-integration code touched by this diff.
Missing validation on an LLM-driven decision ✅ Passed No LLM/AI-integration code touched by this diff.
Unbounded LLM usage (denial-of-wallet) ✅ Passed No LLM/AI-integration code touched by this diff.
Table exposed without row-level security ✅ Passed No row-level-security-related code touched by this diff.
Over-broad row-level security policy ✅ Passed No row-level-security-related code touched by this diff.
Code path that bypasses row-level security ✅ Passed No row-level-security-related code touched by this diff.
Privileged database credential reachable from the client ✅ Passed No row-level-security-related code touched by this diff.
Privileged query without row-level scoping ✅ Passed No row-level-security-related code touched by this diff.
Template-default gradient styling ✅ Passed No added frontend pages or design-slop markers in this diff.
Interchangeable AI marketing copy ✅ Passed No added frontend pages or design-slop markers in this diff.
Placeholder content shipped to users ✅ Passed No added frontend pages or design-slop markers in this diff.
Emoji standing in for an icon system ✅ Passed No added frontend pages or design-slop markers in this diff.
Call-to-action that goes nowhere ✅ Passed No added frontend pages or design-slop markers in this diff.
Templated page composition ✅ Passed No added frontend pages or design-slop markers in this diff.
PII in logs ✅ Passed No pii in logs issues detected.
PII or internals leaked in error response ✅ Passed No pii or internals leaked in error response issues detected.
PII stored without application-level encryption ✅ Passed No pii stored without application-level encryption issues detected.
User data stored without retention controls ✅ Passed No user data stored without retention controls issues detected.
PII sent to external / cross-border destination ✅ Passed No pii sent to external / cross-border destination issues detected.
Lockfile resolution / integrity tampered ✅ Passed No lockfile resolution / integrity tampered issues detected.
Dependency runs install-time lifecycle script ✅ Passed No dependency runs install-time lifecycle script issues detected.
Possible dependency-confusion attack ✅ Passed No possible dependency-confusion attack issues detected.
Lockfile resolves a dependency the manifest does not declare ✅ Passed No lockfile resolves a dependency the manifest does not declare issues detected.
Checked-in build artefact modified without source change ✅ Passed No checked-in build artefact modified without source change issues detected.
Dockerfile build-step is insecure ✅ Passed No dockerfile build-step is insecure issues detected.
External artefact pulled in without integrity pinning ✅ Passed No external artefact pulled in without integrity pinning issues detected.
Changed export, importer not updated ✅ Passed No changed export with an un-updated importer detected.
Missing security-team review on sensitive path ✅ Passed No missing security-team review on sensitive path issues detected.
Migration missing rollback / down step ✅ Passed No migration missing rollback / down step issues detected.
Frontend importing database client directly ✅ Passed No frontend importing database client directly issues detected.
Route handler bypassing service layer ✅ Passed No route handler bypassing service layer issues detected.
Backend service importing UI module ✅ Passed No backend service importing ui module issues detected.
Cross-context internals import ✅ Passed No cross-context internals import issues detected.
Workspace package rule violation ✅ Passed No workspace package rule violation issues detected.
Inconsistent logging pattern ✅ Passed No inconsistent logging pattern issues detected.
Inconsistent error handling ✅ Passed No inconsistent error handling issues detected.
Endpoint missing input validation ✅ Passed No endpoint missing input validation issues detected.
Multi-write without transaction wrapper ✅ Passed No multi-write without transaction wrapper issues detected.
New feature shipped without feature flag ✅ Passed No new feature shipped without feature flag issues detected.
Module placed in the wrong workspace package ✅ Passed No module placed in the wrong workspace package issues detected.
Direct env-var access bypasses config module ✅ Passed No direct env-var access bypasses config module issues detected.
Hallucinated import (package not installed) ✅ Passed No hallucinated import (package not installed) issues detected.
Nonexistent package (not found in registry) ✅ Passed No nonexistent package (not found in registry) issues detected.
Call to function that does not exist ✅ Passed No call to function that does not exist issues detected.
Generic placeholder identifier in production logic ✅ Passed No generic placeholder identifier in production logic issues detected.
Repetitive boilerplate (duplicated block) ✅ Passed No repetitive boilerplate (duplicated block) issues detected.
Overbroad try/catch swallowing all exceptions ✅ Passed No overbroad try/catch swallowing all exceptions issues detected.
TODO / FIXME on critical path ✅ Passed No todo / fixme on critical path issues detected.
Comment contradicts or fabricates code behaviour ✅ Passed No comment contradicts or fabricates code behaviour issues detected.
Abstraction defined but never used ✅ Passed No abstraction defined but never used issues detected.
Code style differs from rest of codebase ✅ Passed No code style differs from rest of codebase issues detected.
Established pattern ignored ✅ Passed No established pattern ignored issues detected.
Unhandled edge case (null / empty / zero / boundary) ✅ Passed No unhandled edge case (null / empty / zero / boundary) issues detected.
Doc-copy code with insecure defaults ✅ Passed No doc-copy code with insecure defaults issues detected.
Dead code (defined but never referenced) ✅ Passed No dead code (defined but never referenced) issues detected.
Deprecated API call ✅ Passed No deprecated api call issues detected.
API pattern from wrong library version ✅ Passed No api pattern from wrong library version issues detected.
API endpoint removed ✅ Passed No api endpoint removed issues detected.
HTTP method changed (GET ↔ POST etc.) ✅ Passed No http method changed (get ↔ post etc.) issues detected.
New required field added to request ✅ Passed No new required field added to request issues detected.
Field removed from response schema ✅ Passed No field removed from response schema issues detected.
Response field type changed ✅ Passed No response field type changed issues detected.
HTTP status code changed ✅ Passed No http status code changed issues detected.
Auth requirement added / removed / changed ✅ Passed No auth requirement added / removed / changed issues detected.
Error response shape changed ✅ Passed No error response shape changed issues detected.
Pagination behaviour changed ✅ Passed No pagination behaviour changed issues detected.
Outbound webhook payload schema changed ✅ Passed No outbound webhook payload schema changed issues detected.
GraphQL field removed without deprecation ✅ Passed No graphql field removed without deprecation issues detected.
GraphQL enum value removed ✅ Passed No graphql enum value removed issues detected.
SQL injection ✅ Passed No sql injection issues detected.
Cross-site scripting (XSS) ✅ Passed No cross-site scripting (xss) issues detected.
Path traversal ✅ Passed No path traversal issues detected.
Command injection ✅ Passed No command injection issues detected.
Insecure deserialization ✅ Passed No insecure deserialization issues detected.
Weak cryptography ✅ Passed No weak cryptography issues detected.
Hardcoded secret ✅ Passed No hardcoded secret issues detected.
Insecure randomness for security material ✅ Passed No insecure randomness for security material issues detected.
Unsafe file upload ✅ Passed No unsafe file upload issues detected.
Missing input validation ✅ Passed No missing input validation issues detected.
Unsafe CORS configuration ✅ Passed No unsafe cors configuration issues detected.
Unsafe / open redirect ✅ Passed No unsafe / open redirect issues detected.
Missing CSRF protection ✅ Passed No missing csrf protection issues detected.
Unsafe cookie / session settings ✅ Passed No unsafe cookie / session settings issues detected.
Sensitive data exposure ✅ Passed No sensitive data exposure issues detected.
API key in source ✅ Passed No api key in source detected.
Access token in source ✅ Passed No access token in source detected.
Private key in source ✅ Passed No private key in source detected.
Database connection URL with embedded credentials ✅ Passed No database connection url with embedded credentials detected.
Cloud credential in source ✅ Passed No cloud credential in source detected.
Webhook signing secret in source ✅ Passed No webhook signing secret in source detected.
OAuth client secret in source ✅ Passed No oauth client secret in source detected.
JWT signing secret in source ✅ Passed No jwt signing secret in source detected.
Hardcoded password ✅ Passed No hardcoded password detected.
pull_request_target executes untrusted PR code ✅ Passed No pull_request_target executes untrusted pr code issues detected.
Repository secrets exposed to fork PRs ✅ Passed No repository secrets exposed to fork prs issues detected.
Overbroad GITHUB_TOKEN / pipeline permissions ✅ Passed No overbroad github_token / pipeline permissions issues detected.
Third-party action pinned by mutable tag ✅ Passed No third-party action pinned by mutable tag issues detected.
Shell injection via workflow expression ✅ Passed No shell injection via workflow expression issues detected.
Cache poisoning risk from fork PRs ✅ Passed No cache poisoning risk from fork prs issues detected.
Environment protection rule weakened ✅ Passed No environment protection rule weakened issues detected.
Auth middleware removed from route ✅ Passed No auth middleware removed from route issues detected.
Route protection changed (protected → public) ✅ Passed No route protection changed (protected → public) issues detected.
Permission / RBAC check removed ✅ Passed No permission / rbac check removed issues detected.
Required role weakened ✅ Passed No required role weakened issues detected.
Admin-only route exposed to lower privilege ✅ Passed No admin-only route exposed to lower privilege issues detected.
Token validation skipped in middleware chain ✅ Passed No token validation skipped in middleware chain issues detected.
JWT verification weakened or changed ✅ Passed No jwt verification weakened or changed issues detected.
Session expiration / TTL changed ✅ Passed No session expiration / ttl changed issues detected.
Password reset flow changed ✅ Passed No password reset flow changed issues detected.
OAuth callback / redirect handling changed ✅ Passed No oauth callback / redirect handling changed issues detected.
Webhook endpoint missing signature verification ✅ Passed No webhook endpoint missing signature verification issues detected.
Public route touches private/PII data ✅ Passed No public route touches private/pii data issues detected.
Table dropped (data loss) ✅ Passed No table dropped (data loss) issues detected.
Column dropped (data loss) ✅ Passed No column dropped (data loss) issues detected.
Column type narrowed (truncation risk) ✅ Passed No column type narrowed (truncation risk) issues detected.
Constraint removed ✅ Passed No constraint removed issues detected.
Index dropped ✅ Passed No index dropped issues detected.
NULL → NOT NULL (backfill required) ✅ Passed No null → not null (backfill required) issues detected.
NOT NULL → NULL (constraint relaxed) ✅ Passed No not null → null (constraint relaxed) issues detected.
Column default changed ✅ Passed No column default changed issues detected.
Primary key changed (FK cascade risk) ✅ Passed No primary key changed (fk cascade risk) issues detected.
Foreign key changed ✅ Passed No foreign key changed issues detected.
Unique constraint removed (duplicate risk) ✅ Passed No unique constraint removed (duplicate risk) issues detected.
Enum value removed ✅ Passed No enum value removed issues detected.
Column renamed without compatibility alias ✅ Passed No column renamed without compatibility alias issues detected.
Table renamed without compatibility view ✅ Passed No table renamed without compatibility view issues detected.
Long-locking migration operation ✅ Passed No long-locking migration operation issues detected.
CREATE INDEX without CONCURRENTLY ✅ Passed No create index without concurrently issues detected.
Code correctness issue ✅ Passed No additional explanation was reported.
Runtime error risk ✅ Passed No additional explanation was reported.
Resource leak risk ✅ Passed No additional explanation was reported.
Data integrity risk ✅ Passed No additional explanation was reported.
Maintainability issue ✅ Passed No additional explanation was reported.
Co-change coupling ✅ Passed No additional explanation was reported.
Redundant alias / duplicate import ✅ Passed No additional explanation was reported.
Redundant type construct ✅ Passed No additional explanation was reported.
Simplifiable code ✅ Passed No additional explanation was reported.
Unnecessary type assertion ✅ Passed No additional explanation was reported.
Module smell ✅ Passed No additional explanation was reported.
Excessive complexity ✅ Passed No additional explanation was reported.
Dead export (no callers) ✅ Passed No additional explanation was reported.
Code duplication / DRY violation ✅ Passed No additional explanation was reported.
Complexity Guard ✅ Passed No additional explanation was reported.

This comment is updated automatically whenever Autter reviews a new PR revision.

@autter-dev

autter-dev Bot commented Aug 16, 2026

Copy link
Copy Markdown

🧭 PR hygiene & process suggestions

Autter has 1 suggestion(s) about the shape of this PR (size, scope, reviewability). These are process guidance — not code defects — so they are consolidated here instead of posted as inline comments on individual files.

🟠 PR mixes refactor and behavior change — Risk: 59/100

The PR combines a no-behavior cleanup removing an obsolete Rust helper with substantial Windows installer and release-pipeline behavior changes. src/authorship/cas_bridge.rs and install.ps1 are the files contributing most to the mix. Split the obsolete helper removal into a separate cleanup PR, keeping the Windows installer, documentation, and release workflow fixes together. No high-fan-in or cross-scope files were reported. Blast radius — if the refactor introduces a regression the behavior change masks it on: functions enqueue_transcript_file, messages_from_transcript_file; dependent files crate::api::client::{ApiClient, ApiContext}, crate::api::types::CasMessagesObject, crate::authorship::authorship_log::{PromptRecord, SessionRecord}, crate::authorship::authorship_log_serialization::{generate_session_id, generate_short_hash}, crate::authorship::internal_db::InternalDatabase, crate::authorship::transcript::Message, crate::authorship::working_log::{AgentId, Checkpoint}, crate::config.

🛠 AI fix prompt (copy & paste into your coding agent)
Split this PR so refactors land separately from behavior changes.
Pure-refactor PRs should preserve behavior (no test changes beyond renames). Behavior-change PRs should focus on a single new capability.
Start by extracting `src/authorship/cas_bridge.rs`'s refactor portion (or its behavior portion, whichever is smaller) into its own PR.

Flagged by Autter PR-hygiene checks.


⚠️ 2 unconfirmed finding(s) — flagged by a detector but not proven by Autter's verification pass

Inline comments are reserved for findings that survived verification. These are plausible but could not be confirmed from the available context, so they are listed here as FYIs instead — review the ones that look real to you.

  • 🟡 Missing linked tracker issue (risk 49/100) — .github/workflows/release.yml:66 — No linked tracker issue is visible in the supplied PR title or context, but the actual PR description and any repository policy requiring an issue link were not provided, so the policy violation cannot be established conclusively.
  • 🟡 Missing CODEOWNERS reviewer approval (risk 49/100) — .github/workflows/release.yml:66 — The supplied files do not include CODEOWNERS contents, branch protection settings, or actual reviewer metadata, so the claim that no required owner approval exists cannot be proven or disproven from the evidence provided.
🔇 2 finding(s) suppressed as likely false positives by Autter's verification pass

These were flagged by a detector but a second, full-file verification judged them not to be real issues. Listed here for transparency — review if you disagree.

  • 🟡 Deployment workflow changed (risk 1/100) — .github/workflows/release.yml:4 — This is a generic risk statement, not a demonstrated defect. The full workflow consistently builds, stages, checksums, templates, and publishes the Windows assets and both installer scripts; no incorrect publication or security-impacting change is shown.
  • 🟠 Source changes without matching tests (risk 60/100) — src/authorship/cas_bridge.rs:107 — The file already contains an extensive #[cfg(test)] module covering transcript parsing and message normalization, including empty-content handling and multiple populated transcript formats. The diff removes stale code and leaves the existing messages_from_transcript_file flow correctly guarded by empty/raw/event/message checks; absence of a new sibling test file does not establish a defect.

@autter-dev autter-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autter completed PR review for #41: 3 finding(s) remain below the merge-blocking bar, so this review stays neutral rather than approving. See the findings below; the task checklist follows as the review's final comment.

@sagnik11

Copy link
Copy Markdown
Member Author

Validation build (workflow_dispatch on this branch, publishes nothing): all 6 targets green, including the two new Windows binaries — https://github.com/Autter-dev/autter-cli/actions/runs/31955584963

  • Build autter-windows-x64.exe: ✅
  • Build autter-windows-arm64.exe: ✅
  • macOS arm64/x64, Linux x64/arm64: ✅
  • Publish release: skipped (no tag — as designed)

@sagnik11
sagnik11 merged commit 141f4e9 into main Aug 16, 2026
9 checks passed

@autter-dev autter-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autter posted 12 finding(s) as review threads below (🟡 12). Each carries a copy-paste AI fix prompt.


## Summary

Windows installs were broken end-to-end, with five independent reports converging on the same experience: the documented PowerShell one-liner either died in the shell before running, crashed inside architecture detection, or failed with an opaque `Failed to download binary (HTTP error)`. Three stacked root causes:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 315

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:5: Line length: Expected: 80; Actual: 315

Flagged by Autter security & observability checks.


Windows installs were broken end-to-end, with five independent reports converging on the same experience: the documented PowerShell one-liner either died in the shell before running, crashed inside architecture detection, or failed with an opaque `Failed to download binary (HTTP error)`. Three stacked root causes:

1. **Releases shipped no Windows binaries at all.** `release.yml` had no Windows targets in its build matrix, so every `autter-windows-x64.exe` download URL 404'd — while the docs advertised Windows support.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 207

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:7: Line length: Expected: 80; Actual: 207

Flagged by Autter security & observability checks.

Windows installs were broken end-to-end, with five independent reports converging on the same experience: the documented PowerShell one-liner either died in the shell before running, crashed inside architecture detection, or failed with an opaque `Failed to download binary (HTTP error)`. Three stacked root causes:

1. **Releases shipped no Windows binaries at all.** `release.yml` had no Windows targets in its build matrix, so every `autter-windows-x64.exe` download URL 404'd — while the docs advertised Windows support.
2. **`install.ps1` architecture detection could crash.** `Get-Architecture` probed `RuntimeInformation::OSArchitecture` (unresolvable on some Windows PowerShell 5.1 hosts) and its env-var fallback misdetected 32-bit shells on 64-bit Windows (`PROCESSOR_ARCHITECTURE='x86'` under WOW64), returning `$null` — and the "unsupported architecture" error message then re-probed `RuntimeInformation` *outside* any try/catch, replacing the friendly error with an uncaught `PropertyNotFound`/`TypeNotFound` exception.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 507

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:8: Line length: Expected: 80; Actual: 507

Flagged by Autter security & observability checks.


1. **Releases shipped no Windows binaries at all.** `release.yml` had no Windows targets in its build matrix, so every `autter-windows-x64.exe` download URL 404'd — while the docs advertised Windows support.
2. **`install.ps1` architecture detection could crash.** `Get-Architecture` probed `RuntimeInformation::OSArchitecture` (unresolvable on some Windows PowerShell 5.1 hosts) and its env-var fallback misdetected 32-bit shells on 64-bit Windows (`PROCESSOR_ARCHITECTURE='x86'` under WOW64), returning `$null` — and the "unsupported architecture" error message then re-probed `RuntimeInformation` *outside* any try/catch, replacing the friendly error with an uncaught `PropertyNotFound`/`TypeNotFound` exception.
3. **Download failures were opaque.** All download exceptions were swallowed and reported as a single `Failed to download binary (HTTP error)` with no URL, status code, or troubleshooting path.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 193

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:9: Line length: Expected: 80; Actual: 193

Flagged by Autter security & observability checks.

2. **`install.ps1` architecture detection could crash.** `Get-Architecture` probed `RuntimeInformation::OSArchitecture` (unresolvable on some Windows PowerShell 5.1 hosts) and its env-var fallback misdetected 32-bit shells on 64-bit Windows (`PROCESSOR_ARCHITECTURE='x86'` under WOW64), returning `$null` — and the "unsupported architecture" error message then re-probed `RuntimeInformation` *outside* any try/catch, replacing the friendly error with an uncaught `PropertyNotFound`/`TypeNotFound` exception.
3. **Download failures were opaque.** All download exceptions were swallowed and reported as a single `Failed to download binary (HTTP error)` with no URL, status code, or troubleshooting path.

Fixing this also surfaced a latent release bug affecting **all** platforms: the version-pinned install scripts attached to releases silently ignored their version pin and skipped checksum verification (see below).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 213

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:11: Line length: Expected: 80; Actual: 213

Flagged by Autter security & observability checks.


- **New build targets**: `autter-windows-x64.exe` (`x86_64-pc-windows-msvc`) and `autter-windows-arm64.exe` (`aarch64-pc-windows-msvc`, cross-compiled on the same x64 runner via the VS 2022 ARM64 toolchain), both on `windows-2022`. No OpenSSL is needed on Windows — TLS goes through native-tls/SChannel, and the only C build is the bundled SQLite.
- The stage step appends `.exe` to the built-binary path for Windows targets; the assemble step's asset list (single `assets` variable now, previously duplicated) includes both Windows binaries in `checksums.txt` and the embedded checksum string.
- **Version-pinned `install.ps1` is now attached to releases** (filled by the same `fill-install-template.py`), giving Windows the pin + checksum verification that install.sh already had on paper.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 196

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:19: Line length: Expected: 80; Actual: 196

Flagged by Autter security & observability checks.


### `install.ps1`

- **`Get-Architecture` rewritten**: checks `PROCESSOR_ARCHITEW6432` first (set for 32-bit shells on 64-bit Windows, where `PROCESSOR_ARCHITECTURE` misreports `x86`), then `PROCESSOR_ARCHITECTURE`, then falls back to `RuntimeInformation` inside a try/catch. Env vars exist on every PowerShell version and can't throw.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 316

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:23: Line length: Expected: 80; Actual: 316

Flagged by Autter security & observability checks.

### `install.ps1`

- **`Get-Architecture` rewritten**: checks `PROCESSOR_ARCHITEW6432` first (set for 32-bit shells on 64-bit Windows, where `PROCESSOR_ARCHITECTURE` misreports `x86`), then `PROCESSOR_ARCHITECTURE`, then falls back to `RuntimeInformation` inside a try/catch. Env vars exist on every PowerShell version and can't throw.
- **Unsupported-architecture error no longer crashes**: it reports `$env:PROCESSOR_ARCHITECTURE` instead of re-probing `RuntimeInformation` outside a try/catch.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 160

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:24: Line length: Expected: 80; Actual: 160

Flagged by Autter security & observability checks.


- **`Get-Architecture` rewritten**: checks `PROCESSOR_ARCHITEW6432` first (set for 32-bit shells on 64-bit Windows, where `PROCESSOR_ARCHITECTURE` misreports `x86`), then `PROCESSOR_ARCHITECTURE`, then falls back to `RuntimeInformation` inside a try/catch. Env vars exist on every PowerShell version and can't throw.
- **Unsupported-architecture error no longer crashes**: it reports `$env:PROCESSOR_ARCHITECTURE` instead of re-probing `RuntimeInformation` outside a try/catch.
- **Transparent download errors**: each failed attempt is recorded as `<url> -> HTTP <code> <status>` (or the exception message for network/TLS failures). The final error lists every attempted URL with its specific failure, and a 404 gets targeted guidance: the release has no Windows binary, Windows binaries ship with v1.6.8+, and how to unpin `AUTTER_RELEASE_TAG`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 367

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:25: Line length: Expected: 80; Actual: 367

Flagged by Autter security & observability checks.


### `install.sh` + `install.ps1` — fill-proof placeholder guards

`fill-install-template.py` blindly replaces every occurrence of each placeholder token, **including the guard comparisons**. In the pinned copy attached to releases, `[ "$PINNED_VERSION" != "__VERSION_PLACEHOLDER__" ]` became `[ "v1.6.7" != "v1.6.7" ]` (never true → the pin was ignored and "latest" installed) and the checksum guard compared the checksums string to itself (always true → verification silently skipped). Verified against the actual v1.6.7 release asset. Both scripts now compare against sentinel values built by string concatenation (`'__VERSION_' + 'PLACEHOLDER__'`), which survive the fill; comments no longer embed the literal tokens either.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [deterministic] markdownlint: MD013 — Risk: 30/100

Line length: Expected: 80; Actual: 661

🛠 AI fix prompt (copy & paste into your coding agent)
Fix the markdownlint `MD013` issue at changelog/windows-release-and-installer-fixes.md:29: Line length: Expected: 80; Actual: 661

Flagged by Autter security & observability checks.

@autter-dev

autter-dev Bot commented Aug 16, 2026

Copy link
Copy Markdown

Autter task list

  • @sagnik11 Separate the Rust cleanup from the Windows release changes (src/authorship/cas_bridge.rs, install.ps1, .github/workflows/release.yml) - Owner: sagnik11 — move the unused enqueue_transcript_file removal in src/authorship/cas_bridge.rs into a separate follow-up commit or PR, then verify the current release change remains behaviorally focused.
  • @sagnik11 Create and link a release-and-installer tracking issue (.github/workflows/release.yml, install.ps1, install.sh) - Owner: sagnik11 — create a tracker issue covering Windows x64/ARM64 assets, checksum generation, installer upgrades, and documentation, and add its reference to the pull request and relevant release follow-up records.
  • @sagnik11 Add required ownership and obtain approvals for release paths (.github/workflows/release.yml, install.ps1, install.sh) - Owner: sagnik11 — add or update CODEOWNERS entries for the release workflow, installers, documentation, changelog, and Rust authorship code, then obtain approval from each applicable owner before merging.
  • @sagnik11 Wrap changelog lines to satisfy markdownlint (changelog/windows-release-and-installer-fixes.md) - Owner: sagnik11 — reflow every overlong line in changelog/windows-release-and-installer-fixes.md to no more than 80 characters while preserving the release notes’ meaning and formatting.
  • @sagnik11 Validate the complete Windows release workflow (.github/workflows/release.yml, install.sh, src/authorship/cas_bridge.rs) - Owner: sagnik11 — run the required formatting, lint, and test tasks, trigger workflow_dispatch, and verify x64 and ARM64 assets are built with the expected names and uploaded without publishing a release.
  • @sagnik11 Exercise Windows installer installation and upgrade scenarios (install.ps1, INSTALL.md, README.md) - Owner: sagnik11 — test x64 and ARM64 installs, pinned valid and invalid checksum cases, PATH de-duplication, fresh-terminal CLI execution, and reinstalling while the daemon or managed process holds the existing binary.

Generated from PR diff, blast radius, and context.

Issues found

  1. PR mixes refactor and behavior change · risk 59/100 · src/authorship/cas_bridge.rs:104
  2. Missing linked tracker issue · risk 49/100 · .github/workflows/release.yml:66
  3. Missing CODEOWNERS reviewer approval · risk 49/100 · .github/workflows/release.yml:66
  4. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:24
  5. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:25
  6. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:29
  7. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:5
  8. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:7
  9. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:8
  10. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:9
  11. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:11
  12. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:17
  13. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:18
  14. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:19
  15. markdownlint: MD013 · risk 30/100 · changelog/windows-release-and-installer-fixes.md:23

🛠 Fix options

Check one option and Autter will start a fix run for the unresolved issues above.

  • One PR with all unresolved fixes
  • One independent PR per unresolved issue

Checking a box triggers the fix run immediately — Autter comments back with the issues being fixed and the branch created for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant